package designpattern.prototype.DeepClone;

import java.util.ArrayList;
import java.util.List;

public class Client {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("fish");
        list.add("play ball");
        SpecificPrototype specificPrototype = new SpecificPrototype("steak", "man", list);
        SpecificPrototype deepClone = specificPrototype.deepClone();
        specificPrototype.getHobbies().add("swing");
        System.out.println("原型  "+specificPrototype);
        System.out.println("克隆  "+deepClone);
    }
}
